package com.example.springbootjsp.web;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

/**
 * @author: huaijn
 * @create: 2022/3/25 21:30
 * @description: todo
 **/
@Controller
public class IndexControl {

   @RequestMapping("/index")
    public ModelAndView index(){
           ModelAndView modelAndView = new ModelAndView();
           modelAndView.addObject("message", "hello");
           modelAndView.setViewName("index");
           return modelAndView;
    }
}
